package com.ruoyi.community.service.ec.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.community.mapper.EcFoodsInOrderMapper;
import com.ruoyi.community.domain.EcFoodsInOrder;
import com.ruoyi.community.service.ec.IEcFoodsInOrderService;

/**
 * 社区电商Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-15
 */
@Service
public class EcFoodsInOrderServiceImpl implements IEcFoodsInOrderService 
{
    @Autowired
    private EcFoodsInOrderMapper ecFoodsInOrderMapper;

    /**
     * 查询社区电商
     * 
     * @param saleId 社区电商ID
     * @return 社区电商
     */
    @Override
    public EcFoodsInOrder selectEcFoodsInOrderById(Long saleId)
    {
        return ecFoodsInOrderMapper.selectEcFoodsInOrderById(saleId);
    }

    @Override
    public List<EcFoodsInOrder> selectEcFoodsInOrderByOrderId(Integer orderId)
    {
        return ecFoodsInOrderMapper.selectEcFoodsInOrderByOrderId(orderId);
    }

    /**
     * 查询社区电商列表
     * 
     * @param ecFoodsInOrder 社区电商
     * @return 社区电商
     */
    @Override
    public List<EcFoodsInOrder> selectEcFoodsInOrderList(EcFoodsInOrder ecFoodsInOrder)
    {
        return ecFoodsInOrderMapper.selectEcFoodsInOrderList(ecFoodsInOrder);
    }

    /**
     * 新增社区电商
     * 
     * @param ecFoodsInOrder 社区电商
     * @return 结果
     */
    @Override
    public int insertEcFoodsInOrder(EcFoodsInOrder ecFoodsInOrder)
    {
        return ecFoodsInOrderMapper.insertEcFoodsInOrder(ecFoodsInOrder);
    }

    /**
     * 修改社区电商
     * 
     * @param ecFoodsInOrder 社区电商
     * @return 结果
     */
    @Override
    public int updateEcFoodsInOrder(EcFoodsInOrder ecFoodsInOrder)
    {
        return ecFoodsInOrderMapper.updateEcFoodsInOrder(ecFoodsInOrder);
    }

    /**
     * 批量删除社区电商
     * 
     * @param saleIds 需要删除的社区电商ID
     * @return 结果
     */
    @Override
    public int deleteEcFoodsInOrderByIds(Long[] saleIds)
    {
        return ecFoodsInOrderMapper.deleteEcFoodsInOrderByIds(saleIds);
    }

    /**
     * 删除社区电商信息
     * 
     * @param saleId 社区电商ID
     * @return 结果
     */
    @Override
    public int deleteEcFoodsInOrderById(Long saleId)
    {
        return ecFoodsInOrderMapper.deleteEcFoodsInOrderById(saleId);
    }
}
